﻿using System;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            //隐式接口
            Lotus lotus = new Lotus();
            lotus.Print("莲花");
            lotus.NickName = "水华";
            lotus.Color = "红、粉红、白、紫";
            lotus.FlowerLanguage = "清白、纯洁、坚贞";
            Console.WriteLine("别名:" + lotus.NickName);
            Console.WriteLine("花色:" + lotus.Color);
            Console.WriteLine("花语:" + lotus.FlowerLanguage);

            //显示接口
            GinkgoTree ginkgoTree = new GinkgoTree();
            ITree tree = ginkgoTree;
            tree.Print("银杏");
            tree.NickName = "白果";
            tree.Purpose = "果实和叶子均有很高的药用价值、食用价值";
            Console.WriteLine("别名:" + tree.NickName);
            Console.WriteLine("用途:" + tree.Purpose);
        }
    }
}
